package com.jd.xubobo.bookshow.dao;

import com.jd.xubobo.bookshow.domain.Book;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;


public interface BookMapper {

    //得到图书id总数
    public int getBookNum();

    //根据id查询书籍信息
    public Book findById(@Param("id") long  id);

    //根据书籍名称查找书籍信息
    public Book findByName(@Param("name")String name);

    //根据页码信息列出书籍
    public List<Book> bookListByPage(@Param("offset") int offset, @Param("length") int length);

    //增加书籍信息
    public int insertOne(Book book);

    //根据ID删除书籍信息
    public int deleteOne(long id);

    //修改书籍信息
    public int updateOne(Book book);
}
